package com.yphone.utils;

import android.widget.Toast;

import com.iiordanov.bVNC.App;

public class ToastUtils {

    private static final String NULL = "null";

    public static void showLong(CharSequence text) {
        if (text == null) {
            text = null;
        }
        show(text, 1);
    }


    private static void show(String format, int duration, Object... args) {
        String text = format;
        if (text == null) {
            text = NULL;
        } else if (args != null && args.length > 0) {
            text = String.format(format, args);
        }
        show((CharSequence) text, duration);
    }

    private static void show(final CharSequence text, final int duration) {
        Toast.makeText(App.getContext(),text,1).show();
    }

}
